//定义商品相关的api 接口
import request from '@/utils/request'
interface MyHotListParams {
    count?: number,
    limitNum?:number 
}

//秒杀商品接口

export const MiaoSaApi = (info:MyHotListParams)=>request.get('/pro/seckilllist',{
    params:info 
})

//商品列表的接口

export const ShoppingApi = (info:{count: number, limitNum?: number })=>request.get('/pro/list',{
    params: info 
})
//热门搜素
export const HotwordApi = ()=>request.get('/pro/hotword')
//模糊搜索
export const SearchListApi = (keyword:string,count?:number)=>request.get('/pro/search',{params:{keyword,count}})
//获取产品分类列表
export const  CategorylistApi = ()=>request.get('/pro/categorylist') 
//产品列表页下的品牌
export const  CategorybrandlistApi = (cat:string)=>request.get('/pro/categorybrandlist',{
    params:{category: cat}
})
//获取的是列表页下的品牌下的产品列表
export const categortBrandGoodsListApi = (info: { category: string, brand: string }) => request.get('/pro/categorybrandprolist', {
    params: info
  })

  //获取产品详情数据
  export const detailProidApi = (id:string)=>request.get(`/pro/detail/${id}`)

  //获取推荐列表 
  export const recommendlistApi = ()=>request.get('/pro/recommendlist')



  